.class public Lcom/bitauto/autoeasy/TabBaseActivity;
.super Landroid/app/TabActivity;
.source "TabBaseActivity.java"


# instance fields
.field dialog:Landroid/app/ProgressDialog;

.field tempView:Landroid/view/View;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 28
    invoke-direct {p0}, Landroid/app/TabActivity;-><init>()V

    return-void
.end method


# virtual methods
.method public DialogCity(Ljava/util/ArrayList;)Landroid/app/AlertDialog;
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/City;",
            ">;)",
            "Landroid/app/AlertDialog;"
        }
    .end annotation

    .prologue
    .line 165
    .local p1, cityList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/City;>;"
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 166
    .local v0, builder:Landroid/app/AlertDialog$Builder;
    const-string v1, "\u9009\u62e9\u57ce\u5e02"

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 167
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/TabBaseActivity;->ListTOArray(Ljava/util/ArrayList;)[Ljava/lang/String;

    move-result-object v1

    new-instance v2, Lcom/bitauto/autoeasy/TabBaseActivity$1;

    invoke-direct {v2, p0, p1}, Lcom/bitauto/autoeasy/TabBaseActivity$1;-><init>(Lcom/bitauto/autoeasy/TabBaseActivity;Ljava/util/ArrayList;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 173
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v1

    return-object v1
.end method

.method public ListTOArray(Ljava/util/ArrayList;)[Ljava/lang/String;
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/City;",
            ">;)[",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 177
    .local p1, cityList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/City;>;"
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v2

    new-array v0, v2, [Ljava/lang/String;

    .line 178
    .local v0, city:[Ljava/lang/String;
    const/4 v1, 0x0

    .end local p0
    .local v1, i:I
    :goto_0
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lt v1, v2, :cond_0

    .line 181
    return-object v0

    .line 179
    :cond_0
    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/bitauto/autoeasy/selectcar/Object/City;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/Object/City;->getCityName()Ljava/lang/String;

    move-result-object v2

    aput-object v2, v0, v1

    .line 178
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method

.method public downLoadCity()V
    .locals 3

    .prologue
    .line 154
    new-instance v1, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;

    const-string v2, "http://m.bitauto.com/iphoneapi/v2/listcity/?domain=1"

    invoke-direct {v1, v2}, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;-><init>(Ljava/lang/String;)V

    .line 155
    .local v1, cityParser:Lcom/bitauto/autoeasy/selectcar/Object/CityParser;
    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;->Paser2Object()V

    .line 156
    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;->getList()Ljava/util/ArrayList;

    move-result-object v0

    .line 157
    .local v0, cityList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/City;>;"
    if-eqz v0, :cond_0

    .line 158
    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/TabBaseActivity;->DialogCity(Ljava/util/ArrayList;)Landroid/app/AlertDialog;

    move-result-object v2

    invoke-virtual {v2}, Landroid/app/AlertDialog;->show()V

    .line 162
    :goto_0
    return-void

    .line 160
    :cond_0
    const-string v2, "\u83b7\u53d6\u6570\u636e\u5931\u8d25,\u8bf7\u68c0\u67e5\u7f51\u7edc\u662f\u5426\u8fde\u63a5."

    invoke-static {p0, v2}, Lcom/bitauto/autoeasy/tool/ToolBox;->showToast(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public getProgressButton()Landroid/widget/ImageButton;
    .locals 1

    .prologue
    .line 123
    const v0, 0x7f0b01ac

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/TabBaseActivity;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/ImageButton;

    return-object p0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 0
    .parameter "savedInstanceState"

    .prologue
    .line 35
    invoke-super {p0, p1}, Landroid/app/TabActivity;->onCreate(Landroid/os/Bundle;)V

    .line 37
    return-void
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .locals 2
    .parameter "menu"

    .prologue
    .line 130
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/TabBaseActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    .line 131
    .local v0, inflater:Landroid/view/MenuInflater;
    const v1, 0x7f0a0001

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    .line 132
    const/4 v1, 0x1

    return v1
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 2
    .parameter "item"

    .prologue
    .line 139
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 147
    :goto_0
    const/4 v0, 0x0

    return v0

    .line 141
    :pswitch_0
    invoke-static {p0}, Lcom/bitauto/autoeasy/tool/ToolCity;->downLoadCity(Landroid/content/Context;)V

    goto :goto_0

    .line 144
    :pswitch_1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/bitauto/autoeasy/AboutActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/TabBaseActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 139
    :pswitch_data_0
    .packed-switch 0x7f0b01c8
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public onPause()V
    .locals 0

    .prologue
    .line 46
    invoke-super {p0}, Landroid/app/TabActivity;->onPause()V

    .line 47
    invoke-static {p0}, Lcom/mobclick/android/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 48
    return-void
.end method

.method protected onResume()V
    .locals 0

    .prologue
    .line 41
    invoke-super {p0}, Landroid/app/TabActivity;->onResume()V

    .line 42
    invoke-static {p0}, Lcom/mobclick/android/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 43
    return-void
.end method

.method public setLayout(I)V
    .locals 0
    .parameter "layoutid"

    .prologue
    .line 55
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/TabBaseActivity;->setTitle(I)V

    .line 56
    return-void
.end method

.method public setTitle(I)V
    .locals 3
    .parameter "layoutid"

    .prologue
    const/4 v2, 0x7

    .line 62
    invoke-virtual {p0, v2}, Lcom/bitauto/autoeasy/TabBaseActivity;->requestWindowFeature(I)Z

    .line 63
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/TabBaseActivity;->setContentView(I)V

    .line 64
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/TabBaseActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    const v1, 0x7f030022

    invoke-virtual {v0, v2, v1}, Landroid/view/Window;->setFeatureInt(II)V

    .line 66
    return-void
.end method

.method public setTitleContent(Ljava/lang/String;)V
    .locals 2
    .parameter "str"

    .prologue
    .line 73
    const v1, 0x7f0b01ab

    invoke-virtual {p0, v1}, Lcom/bitauto/autoeasy/TabBaseActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 74
    .local v0, textView:Landroid/widget/TextView;
    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 75
    return-void
.end method

.method public setTitleProgressBar(Z)V
    .locals 3
    .parameter "flog"

    .prologue
    .line 88
    if-eqz p1, :cond_1

    .line 89
    const-string v0, ""

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/TabBaseActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f080004

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    invoke-static {p0, v0, v1, v2}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Landroid/app/ProgressDialog;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/TabBaseActivity;->dialog:Landroid/app/ProgressDialog;

    .line 94
    :cond_0
    :goto_0
    return-void

    .line 91
    :cond_1
    iget-object v0, p0, Lcom/bitauto/autoeasy/TabBaseActivity;->dialog:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    .line 92
    iget-object v0, p0, Lcom/bitauto/autoeasy/TabBaseActivity;->dialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    goto :goto_0
.end method

.method public setTitleProgressBar2(Z)V
    .locals 3
    .parameter "flog"

    .prologue
    .line 110
    if-eqz p1, :cond_1

    .line 111
    const-string v0, ""

    const-string v1, "\u4fe1\u606f\u4e0b\u8f7d\u4e2d..."

    const/4 v2, 0x1

    invoke-static {p0, v0, v1, v2}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Landroid/app/ProgressDialog;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/TabBaseActivity;->dialog:Landroid/app/ProgressDialog;

    .line 116
    :cond_0
    :goto_0
    return-void

    .line 113
    :cond_1
    iget-object v0, p0, Lcom/bitauto/autoeasy/TabBaseActivity;->dialog:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    .line 114
    iget-object v0, p0, Lcom/bitauto/autoeasy/TabBaseActivity;->dialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    goto :goto_0
.end method
